Integrand size = 38, antiderivative size = 94 \[ \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {1}{2} a^2 (3 B+2 C) x+\frac {2 a^2 (3 B+2 C) \sin (c+d x)}{3 d}+\frac {a^2 (3 B+2 C) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {C (a+a \cos (c+d x))^2 \sin (c+d x)}{3 d} \]
1/2*a^2*(3*B+2*C)*x+2/3*a^2*(3*B+2*C)*sin(d*x+c)/d+1/6*a^2*(3*B+2*C)*cos(d *x+c)*sin(d*x+c)/d+1/3*C*(a+a*cos(d*x+c))^2*sin(d*x+c)/d
Time = 0.47 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.89 \[ \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {a^2 \sin (c+d x) \left (12 B+11 C+3 (B+2 C) \cos (c+d x)+C \cos (2 (c+d x))+\frac {6 (3 B+2 C) \arcsin \left (\sqrt {\sin ^2\left (\frac {1}{2} (c+d x)\right )}\right )}{\sqrt {\sin ^2(c+d x)}}\right )}{6 d} \]
(a^2*Sin[c + d*x]*(12*B + 11*C + 3*(B + 2*C)*Cos[c + d*x] + C*Cos[2*(c + d *x)] + (6*(3*B + 2*C)*ArcSin[Sqrt[Sin[(c + d*x)/2]^2]])/Sqrt[Sin[c + d*x]^ 2]))/(6*d)
Time = 0.41 (sec) , antiderivative size = 83, normalized size of antiderivative = 0.88, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3042, 3508, 3042, 3230, 3042, 3123}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec (c+d x) (a \cos (c+d x)+a)^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3508 |
\(\displaystyle \int (a \cos (c+d x)+a)^2 (B+C \cos (c+d x))dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (B+C \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3230 |
\(\displaystyle \frac {1}{3} (3 B+2 C) \int (\cos (c+d x) a+a)^2dx+\frac {C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} (3 B+2 C) \int \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2dx+\frac {C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 d}\) |
\(\Big \downarrow \) 3123 |
\(\displaystyle \frac {1}{3} (3 B+2 C) \left (\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{2 d}+\frac {3 a^2 x}{2}\right )+\frac {C \sin (c+d x) (a \cos (c+d x)+a)^2}{3 d}\) |
(C*(a + a*Cos[c + d*x])^2*Sin[c + d*x])/(3*d) + ((3*B + 2*C)*((3*a^2*x)/2 + (2*a^2*Sin[c + d*x])/d + (a^2*Cos[c + d*x]*Sin[c + d*x])/(2*d)))/3
3.3.37.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^2, x_Symbol] :> Simp[(2*a^2 + b^ 2)*(x/2), x] + (-Simp[2*a*b*(Cos[c + d*x]/d), x] - Simp[b^2*Cos[c + d*x]*(S in[c + d*x]/(2*d)), x]) /; FreeQ[{a, b, c, d}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(b*(m + 1)) Int[(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[1/b^2 Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 3.86 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.65
method | result | size |
parallelrisch | \(\frac {3 \left (\left (\frac {B}{6}+\frac {C}{3}\right ) \sin \left (2 d x +2 c \right )+\frac {\sin \left (3 d x +3 c \right ) C}{18}+\left (\frac {4 B}{3}+\frac {7 C}{6}\right ) \sin \left (d x +c \right )+d x \left (B +\frac {2 C}{3}\right )\right ) a^{2}}{2 d}\) | \(61\) |
risch | \(\frac {3 a^{2} B x}{2}+a^{2} C x +\frac {2 \sin \left (d x +c \right ) B \,a^{2}}{d}+\frac {7 \sin \left (d x +c \right ) a^{2} C}{4 d}+\frac {\sin \left (3 d x +3 c \right ) a^{2} C}{12 d}+\frac {\sin \left (2 d x +2 c \right ) B \,a^{2}}{4 d}+\frac {\sin \left (2 d x +2 c \right ) a^{2} C}{2 d}\) | \(99\) |
parts | \(\frac {\left (B \,a^{2}+2 a^{2} C \right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (2 B \,a^{2}+a^{2} C \right ) \sin \left (d x +c \right )}{d}+\frac {B \,a^{2} \left (d x +c \right )}{d}+\frac {a^{2} C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}\) | \(100\) |
derivativedivides | \(\frac {\frac {a^{2} C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+B \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a^{2} C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 B \sin \left (d x +c \right ) a^{2}+a^{2} C \sin \left (d x +c \right )+B \,a^{2} \left (d x +c \right )}{d}\) | \(116\) |
default | \(\frac {\frac {a^{2} C \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+B \,a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 a^{2} C \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+2 B \sin \left (d x +c \right ) a^{2}+a^{2} C \sin \left (d x +c \right )+B \,a^{2} \left (d x +c \right )}{d}\) | \(116\) |
norman | \(\frac {\frac {a^{2} \left (3 B +2 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {a^{2} \left (5 B +6 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {a^{2} \left (3 B +2 C \right ) x}{2}+\frac {11 a^{2} \left (3 B +2 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+2 a^{2} \left (3 B +2 C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 a^{2} \left (3 B +2 C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 a^{2} \left (3 B +2 C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {a^{2} \left (3 B +2 C \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {a^{2} \left (39 B +34 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(227\) |
3/2*((1/6*B+1/3*C)*sin(2*d*x+2*c)+1/18*sin(3*d*x+3*c)*C+(4/3*B+7/6*C)*sin( d*x+c)+d*x*(B+2/3*C))*a^2/d
Time = 0.26 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.74 \[ \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {3 \, {\left (3 \, B + 2 \, C\right )} a^{2} d x + {\left (2 \, C a^{2} \cos \left (d x + c\right )^{2} + 3 \, {\left (B + 2 \, C\right )} a^{2} \cos \left (d x + c\right ) + 2 \, {\left (6 \, B + 5 \, C\right )} a^{2}\right )} \sin \left (d x + c\right )}{6 \, d} \]
1/6*(3*(3*B + 2*C)*a^2*d*x + (2*C*a^2*cos(d*x + c)^2 + 3*(B + 2*C)*a^2*cos (d*x + c) + 2*(6*B + 5*C)*a^2)*sin(d*x + c))/d
\[ \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=a^{2} \left (\int B \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 2 B \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int B \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int C \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 2 C \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int C \cos ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx\right ) \]
a**2*(Integral(B*cos(c + d*x)*sec(c + d*x), x) + Integral(2*B*cos(c + d*x) **2*sec(c + d*x), x) + Integral(B*cos(c + d*x)**3*sec(c + d*x), x) + Integ ral(C*cos(c + d*x)**2*sec(c + d*x), x) + Integral(2*C*cos(c + d*x)**3*sec( c + d*x), x) + Integral(C*cos(c + d*x)**4*sec(c + d*x), x))
Time = 0.21 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.17 \[ \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{2} + 12 \, {\left (d x + c\right )} B a^{2} - 4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} C a^{2} + 6 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} + 24 \, B a^{2} \sin \left (d x + c\right ) + 12 \, C a^{2} \sin \left (d x + c\right )}{12 \, d} \]
1/12*(3*(2*d*x + 2*c + sin(2*d*x + 2*c))*B*a^2 + 12*(d*x + c)*B*a^2 - 4*(s in(d*x + c)^3 - 3*sin(d*x + c))*C*a^2 + 6*(2*d*x + 2*c + sin(2*d*x + 2*c)) *C*a^2 + 24*B*a^2*sin(d*x + c) + 12*C*a^2*sin(d*x + c))/d
Time = 0.31 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.51 \[ \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {3 \, {\left (3 \, B a^{2} + 2 \, C a^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (9 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 24 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 16 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
1/6*(3*(3*B*a^2 + 2*C*a^2)*(d*x + c) + 2*(9*B*a^2*tan(1/2*d*x + 1/2*c)^5 + 6*C*a^2*tan(1/2*d*x + 1/2*c)^5 + 24*B*a^2*tan(1/2*d*x + 1/2*c)^3 + 16*C*a ^2*tan(1/2*d*x + 1/2*c)^3 + 15*B*a^2*tan(1/2*d*x + 1/2*c) + 18*C*a^2*tan(1 /2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d
Time = 1.20 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.04 \[ \int (a+a \cos (c+d x))^2 \left (B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec (c+d x) \, dx=\frac {3\,B\,a^2\,x}{2}+C\,a^2\,x+\frac {2\,B\,a^2\,\sin \left (c+d\,x\right )}{d}+\frac {7\,C\,a^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {B\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {C\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {C\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d} \]